[XEN] kexec: Remove asm/kexec.h. Move the single inline function into
authorIan Campbell <ian.campbell@xensource.com>
Thu, 8 Feb 2007 11:03:29 +0000 (11:03 +0000)
committerIan Campbell <ian.campbell@xensource.com>
Thu, 8 Feb 2007 11:03:29 +0000 (11:03 +0000)
arch specific machine_kexec.c with the other arch specific kexec
functions.

IA64 already had a stub in both kexec.h and machine_kexec.c.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
xen/arch/powerpc/machine_kexec.c
xen/arch/x86/crash.c
xen/arch/x86/machine_kexec.c
xen/common/kexec.c
xen/include/asm-ia64/kexec.h [deleted file]
xen/include/asm-powerpc/kexec.h [deleted file]
xen/include/asm-x86/kexec.h [deleted file]
xen/include/asm-x86/x86_32/kexec.h [deleted file]
xen/include/asm-x86/x86_64/kexec.h [deleted file]
xen/include/xen/kexec.h

index 2debd26a7ec8d4ce038382983dac83d5a054194d..51ddd758904ddf0931583d6b0b897b306792b2ea 100644 (file)
@@ -19,6 +19,11 @@ void machine_reboot_kexec(xen_kexec_image_t *image)
     printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
 }
 
+void machine_kexec(xen_kexec_image_t *image)
+{
+    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
+}
+
 /*
  * Local variables:
  * mode: C
index 73eb4724a8e20ea6d8bfbd8294376c447424984c..cae1768633eb2ff57dcb05d737d52a70851491d3 100644 (file)
@@ -11,7 +11,6 @@
 #include <asm/atomic.h>
 #include <asm/elf.h>
 #include <asm/percpu.h>
-#include <asm/kexec.h>
 #include <xen/types.h>
 #include <xen/irq.h>
 #include <asm/ipi.h>
index 81c392a7d313d43650312e518f398ad08146601c..54fa46679300a89908f4d363443cc5751d8b07e5 100644 (file)
 #include <xen/types.h>
 #include <xen/console.h>
 #include <xen/kexec.h>
-#include <asm/kexec.h>
 #include <xen/domain_page.h>
 #include <asm/fixmap.h>
 #include <asm/hvm/hvm.h>
 
+typedef void (*relocate_new_kernel_t)(
+                unsigned long indirection_page,
+                unsigned long page_list,
+                unsigned long start_address);
+
 int machine_kexec_load(int type, int slot, xen_kexec_image_t *image)
 {
     unsigned long prev_ma = 0;
@@ -94,6 +98,15 @@ void machine_reboot_kexec(xen_kexec_image_t *image)
     BUG();
 }
 
+void machine_kexec(xen_kexec_image_t *image)
+{
+    relocate_new_kernel_t rnk;
+
+    rnk = (relocate_new_kernel_t) image->page_list[1];
+    (*rnk)(image->indirection_page, (unsigned long)image->page_list, 
+           image->start_address);
+}
+
 /*
  * Local variables:
  * mode: C
index a9e85cad7fc27eef1b2df756502b80fcf1a53a7b..80314a6673b162e8aaaca2829e522db156dd0210 100644 (file)
@@ -6,7 +6,6 @@
  * - Magnus Damm <magnus@valinux.co.jp>
  */
 
-#include <asm/kexec.h>
 #include <xen/lib.h>
 #include <xen/ctype.h>
 #include <xen/errno.h>
diff --git a/xen/include/asm-ia64/kexec.h b/xen/include/asm-ia64/kexec.h
deleted file mode 100644 (file)
index 45756e8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef __IA64_KEXEC_H__
-#define __IA64_KEXEC_H__
-
-#include <xen/lib.h>       /* for printk() used in stub */
-#include <xen/types.h>
-#include <public/xen.h>
-#include <xen/kexec.h>
-
-static inline void machine_kexec(xen_kexec_image_t *image)
-{
-    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
-}
-
-#endif /* __IA64_KEXEC_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-set-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
-
diff --git a/xen/include/asm-powerpc/kexec.h b/xen/include/asm-powerpc/kexec.h
deleted file mode 100644 (file)
index f228972..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _ASM_KEXEC_H__
-#define _ASM_KEXEC_H__
-
-#include <xen/lib.h>       /* for printk() used in stub */
-#include <xen/types.h>
-#include <public/xen.h>
-#include <xen/kexec.h>
-
-static inline void machine_kexec(xen_kexec_image_t *image)
-{
-    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
-}
-
-#endif /* _ASM_KEXEC_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-set-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
-
diff --git a/xen/include/asm-x86/kexec.h b/xen/include/asm-x86/kexec.h
deleted file mode 100644 (file)
index d137337..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __X86_KEXEC_H__
-#define __X86_KEXEC_H__
-
-#ifdef __x86_64__
-#include <asm/x86_64/kexec.h>
-#else
-#include <asm/x86_32/kexec.h>
-#endif
-
-#endif /* __X86_KEXEC_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-set-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/include/asm-x86/x86_32/kexec.h b/xen/include/asm-x86/x86_32/kexec.h
deleted file mode 100644 (file)
index cb4ada7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/******************************************************************************
- * kexec.h
- * 
- * Based heavily on machine_kexec.c and kexec.h from Linux 2.6.19-rc1
- *
- */
-  
-#ifndef __X86_KEXEC_X86_32_H__
-#define __X86_KEXEC_X86_32_H__
-
-#include <xen/types.h>
-#include <xen/kexec.h>
-
-typedef asmlinkage void (*relocate_new_kernel_t)(
-               unsigned long indirection_page,
-               unsigned long page_list,
-               unsigned long start_address,
-               unsigned int has_pae);
-
-static inline void machine_kexec(xen_kexec_image_t *image)
-{
-    relocate_new_kernel_t rnk;
-
-    rnk = (relocate_new_kernel_t) image->page_list[1];
-    (*rnk)(image->indirection_page, (unsigned long)image->page_list, 
-           image->start_address, (unsigned long)cpu_has_pae);
-}
-
-#endif /* __X86_KEXEC_X86_32_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-set-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/include/asm-x86/x86_64/kexec.h b/xen/include/asm-x86/x86_64/kexec.h
deleted file mode 100644 (file)
index c54dbb9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/******************************************************************************
- * kexec.h
- * 
- * Based heavily on machine_kexec.c and kexec.h from Linux 2.6.19-rc1
- *
- */
-
-#ifndef __X86_64_KEXEC_H__
-#define __X86_64_KEXEC_H__
-  
-#include <xen/types.h>
-#include <xen/kexec.h>
-
-typedef void (*relocate_new_kernel_t)(
-                unsigned long indirection_page,
-                unsigned long page_list,
-                unsigned long start_address);
-
-static inline void machine_kexec(xen_kexec_image_t *image)
-{
-    relocate_new_kernel_t rnk;
-
-    rnk = (relocate_new_kernel_t) image->page_list[1];
-    (*rnk)(image->indirection_page, (unsigned long)image->page_list, 
-           image->start_address);
-}
-
-#endif /* __X86_64_KEXEC_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-set-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
index be09c0a1ab988db4ed9aea557c01fa721cebb065..523846af0655479a35e92b6e6ff89377e5fd3e24 100644 (file)
@@ -25,6 +25,7 @@ int machine_kexec_load(int type, int slot, xen_kexec_image_t *image);
 void machine_kexec_unload(int type, int slot, xen_kexec_image_t *image);
 void machine_kexec_reserved(xen_kexec_reserve_t *reservation);
 void machine_reboot_kexec(xen_kexec_image_t *image);
+void machine_kexec(xen_kexec_image_t *image);
 void kexec_crash(void);
 void kexec_crash_save_cpu(void);
 crash_xen_info_t *kexec_crash_save_info(void);